Skip to content

BUG: remove redundant call to List.validate_elements#420

Merged
minrk merged 2 commits intoipython:masterfrom
jakevdp:validate-elements-fix
Jun 22, 2017
Merged

BUG: remove redundant call to List.validate_elements#420
minrk merged 2 commits intoipython:masterfrom
jakevdp:validate-elements-fix

Conversation

@jakevdp
Copy link
Copy Markdown
Contributor

@jakevdp jakevdp commented Jun 21, 2017

Because of the super() call and the fact that validate_elements() is called from Container.validate(), this validation does not need to be done again manually.

@rmorshea
Copy link
Copy Markdown
Contributor

rmorshea commented Jun 21, 2017

You should be able to just remove the method entirely since the if hasattr(obj, "validate") check in _validate will catch the one defined by a parent class.

@jakevdp
Copy link
Copy Markdown
Contributor Author

jakevdp commented Jun 21, 2017

Ah, good catch!

@minrk minrk merged commit 1ae3c92 into ipython:master Jun 22, 2017
@minrk minrk added this to the 5.0 milestone Jun 22, 2017
@Carreau Carreau added 5.0-re-review Need to re-review for potential API impact changes. 5.0-no-incidence change that has noincidence on 5.0 compat (eg: doc) and removed 5.0-re-review Need to re-review for potential API impact changes. labels Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0-no-incidence change that has noincidence on 5.0 compat (eg: doc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants